/**
 * 编辑-行情分析js
 */
var vm = new Vue({
	el:'#dpLTE',
	data: {
		contentStr:"",
		quotationAnalysis: {
			status: 1
		}
	},
	methods : {
		setForm: function() {
			$.SetForm({
				url: '../../sys/quotationanalysis/info?_' + $.now(),
		    	param: vm.quotationAnalysis.id,
		    	success: function(data) {
		    		vm.quotationAnalysis = data;
		    		var editor = UE.getEditor('editor');
		    		    editor.ready(function() { 
		    		    	if(vm.quotationAnalysis.content !=null && vm.quotationAnalysis.content!=""){
		    		    	editor.setContent(vm.quotationAnalysis.content); 
		    		    	}
		    				});
		    		    editor.addListener("contentchange", function () {
		    		        $("#introdution").html(editor.getContent());
		    		        vm.contentStr = $("#introdution").html(editor.getContent()).html();
		    		    })
		    	}
			});
		},
		acceptClick: function() {
			if (!$('#form').Validform()) {
		        return false;
		    }
			vm.quotationAnalysis.content = "";
		    $.ConfirmForm({
		    	url: '../../sys/quotationanalysis/update?contentStr='+vm.contentStr+'&_' + $.now(),
		    	param: vm.quotationAnalysis,
		    	success: function(data) {
		    		$.currentIframe().vm.load();
		    	}
		    });
		}
	}
})